-
Notifications
You must be signed in to change notification settings - Fork 279
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Advanced search queries #2934
Advanced search queries #2934
Conversation
5b8d838
to
71b081d
Compare
d7f52f9
to
e42e064
Compare
1563333
to
d8f915e
Compare
d8f915e
to
45480e2
Compare
return SearchResult::complete( | ||
if (count($cardResults) < $query->getLimit()) { | ||
return SearchResult::complete( | ||
'Deck', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Translate?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess that is a different discussion, as we currently never translate the app name for deck.
); | ||
} | ||
|
||
return SearchResult::paginated( | ||
'Deck', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
partial review
<div class="card--placeholder"> | ||
<svg class="card-placeholder__gradient"> | ||
<defs> | ||
<linearGradient id="card-placeholder__gradient"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please check the placeholder from Talk, I had to replace it as it was causing high cpu load due to dynamic SVG gradient not being GPU accelerated: nextcloud/spreed#4554
or raise a ticket to change this later
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do a follow up ticket for this and the unified search in the server where this was inspired from
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
second part of review
} else if (filter === 'tag') { | ||
hasMatch = hasMatch && card.labels.findIndex((label) => label.title.toLowerCase().includes(filterOutQuotes(query).toLowerCase())) !== -1 | ||
} else if (filter === 'date') { | ||
const datediffHour = ((new Date(card.duedate) - new Date()) / 3600 / 1000) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe use moment for diffing dates to avoid potential troubles when crossing DST offsets (rare, so probably not cricial)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is for now using the same logic as the local board filters but I'll split this into a separate ticket for refining both both them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return false | ||
} | ||
const comparator = query[0] + (query[1] === '=' ? '=' : '') | ||
const isValidComparator = ['<', '<=', '>', '>='].indexOf(comparator) !== -1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
throw error in case of no valid comparator ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Until now invalid queries would just attempt to perform an equal comparison for whatever is passed after the :
. I'd keep that for now and move the handling improvement of that into a ticket so we can discuss where and how to show possible errors especially with the unified search, where we'd need server improvements to return possible hints or errors to the user.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
236d061
to
32c30c2
Compare
4be98da
to
174d74c
Compare
32c30c2
to
35816f0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good now, thanks for the adjustments 👍
Signed-off-by: Julius Härtl <[email protected]>
Signed-off-by: Julius Härtl <[email protected]>
Signed-off-by: Julius Härtl <[email protected]>
Signed-off-by: Julius Härtl <[email protected]>
Signed-off-by: Julius Härtl <[email protected]>
Signed-off-by: Julius Härtl <[email protected]>
Signed-off-by: Julius Härtl <[email protected]>
Signed-off-by: Julius Härtl <[email protected]>
Signed-off-by: Julius Härtl <[email protected]>
Signed-off-by: Julius Härtl <[email protected]>
35816f0
to
af309f7
Compare
Signed-off-by: Julius Härtl <[email protected]>
Signed-off-by: Julius Härtl <[email protected]>
Based on #2933
Global search in Deck
A dedicated inline search input was added in order to properly indicate that a search filtering is still active even if the unified search is closed:
Search queries
The search will only return results that match all of the search tokens.
Example query:
project tag:ToDo assigned:alice assigned:bob
Will return all cards where the card title or description contains project AND the tag ToDo is set AND the user alice is assigned AND the user bob is assigned
:
:
:
:
:
>
<
>=
<=
:
Other text tokens will be used to perform a case-insensitive search on the card title and description
Quotes can be used to pass a query with spaces, e.g.
title:"My card"